package com.tbit.main.service.impl;

import com.tbit.main.dao.log.RuleRidePhotoLogDao;
import com.tbit.main.pojo.RuleRidePhotoLog;
import com.tbit.main.service.RuleRidePhotoLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author LMY
 * @create 2022-07-14 17:44
 */
@Service("ruleRidePhotoLogService")
public class RuleRidePhotoLogServiceImpl implements RuleRidePhotoLogService {

    @Autowired
    private RuleRidePhotoLogDao ruleRidePhotoLogDao;

    @Override
    public List<RuleRidePhotoLog> getTypeTime(Integer type, String time) {
        Map<String, Object> map = new HashMap<>();
        map.put("type", type);
        map.put("time", time);
        return ruleRidePhotoLogDao.getTypeTime(map);
    }


    @Override
    public List<RuleRidePhotoLog> getTime(String time) {
        return ruleRidePhotoLogDao.getTime(time);
    }


    @Override
    public void insert(RuleRidePhotoLog ruleRidePhotoLog) {
        ruleRidePhotoLogDao.insert(ruleRidePhotoLog);
    }

    @Override
    public void delete(Integer photoId) {
        ruleRidePhotoLogDao.delete(photoId);
    }
}
